package com.wk.banner.controller;

import java.security.Principal;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

@RestController
@Api(value="IndexController",tags={"首页操作接口"})
public class IndexController {

	@ApiOperation(value="获取hello world ")
	@RequestMapping(value="/getHello",method = RequestMethod.GET)
	@ApiImplicitParams(
			@ApiImplicitParam(name="queryUserId",value="用户ID",dataType="Long",required = false)
	)
	public String getHello(){
		return "hello world";
	}
	
	@RequestMapping("/client")
	public String home(Principal user) {
		return "Hello " + user.getName();
	}
}
